<template>
    <div>
        <mt-swipe :auto="4000">
            <mt-swipe-item>1</mt-swipe-item>
            <mt-swipe-item>2</mt-swipe-item>
            <mt-swipe-item>3</mt-swipe-item>
        </mt-swipe>
        <h3>Home</h3>
    </div>
</template>
<script>
    import {Toast} from 'mint-ui';
    export default {
        data() {
            return {
                lunbotuList: [],

            }
        },
        created() {
            this.getLunBoto()
        },
        methods: {
            getLunBoto() {
                this.$http.post("http://192.168.1.6:9999/i/back_task").then(result => {
                    console.log(result)
                    if (result.status === 200){//判断数据是否请求成功
                        this.lunbotuList = result.body
                        console.log("胜多负少", this.lunbotuList);
                    }else{
                        Toast("获取轮播图失败")
                    }
                })

            }
        }
    }
</script>

<style lang="scss" scoped>
    .mint-swipe {
        height: 200px;
        .mint-swipe-item {
            &:nth-child(1) {
                background-color: red;
            }
            &:nth-child(2) {
                background-color: blue;
            }
            &:nth-child(3) {
                background-color: green;
            }
        }
    }


</style>
